﻿#pragma once
#include <stdio.h>
#include <assert.h>
#include <windows.h>
#include <stdbool.h>
#include <locale.h>
#define KEY_PRESS(VK) ((GetAsyncKeyState(VK) & 0x1) ? 1:0)
#define WALL L'□'



typedef int SnakeNodeData;
enum SnakeState
{
	ESE,//推出
	KILL_BY_SELF,  //吃到自己
	KILL_BY_WALL,  //撞到墙了
	PAUSE  //暂停
};
enum SnakeDirection {
	LEFT,
	RIGHT,
	UP,
	DOWN

};

typedef struct SnakeNode {
	SnakeNodeData val;//是否有必要
	struct SnakeNode* next;
}SnakeNode;

typedef struct Snake {
	SnakeNode* SnakeHead;
	enum SnakeState GameState;
	SnakeNode* Food;
	int Score;
	int FoodWeight;
	int SleepTime;
	enum SnakeDirection Direct;
	//....
}Snake;


//设置光标位置
void SetPos(int x, int y); 


void GameInit();
void PrintWall();